package relu.R.weeds;
import java.util.*;

public enum WeedSpecies {

	/*
	BROSTE (WeedSpecies.brosteBins),
	BRANAP(WeedSpecies.branapBins),
	CAPBP(WeedSpecies.capbpBins),
	CHEALB(WeedSpecies.chealbBins),
	GALAPA(WeedSpecies.galapaBins),
	MATSPP(WeedSpecies.matsppBins),
	PAPRHO(WeedSpecies.paprhoBins),
	POAANN(WeedSpecies.poaannBins),
	POLAVI(WeedSpecies.polaviBins),
	STEMED(WeedSpecies.stemedBins),
	VIOARV(WeedSpecies.vioarvBins);*/
	
//	public final double[] bins;//=new double[5];//={0.01,5.0,10.0,20.0,50.0};
//	private WeedSpecies() {
//		bins = binMap.get(this.toString());
		/*System.out.println(bins_in.length);
		bins=new double[bins_in.length];
		for(int i=0;i<bins_in.length;i++){
			bins[i]=bins_in[i];
		}*/
//	}

/**	AVEFAT,ALOMYO,BROCOM,BROSTE,BRANAP,CAPBP,CHEALB,CIRARV,MYOARV,GALAPA,
 * LAMPUR,MATSPP,PAPRHO,POAANN,POLAVI,POLCON,SENVUL,SINARV,SONSPP,STEMED,VERPER,VIOARV;*/
	ALOMYO,BROSTE,BRANAP,CAPBP,CHEALB,GALAPA,MATSPP,PAPRHO,POAANN,POLAVI,STEMED,VIOARV;	
	private static double[] alomyoBins={0.05,0.1,1.0};
	private static double[] brosteBins={0.1,0.5,6.0};
	private static double[] branapBins={0.2,2.0,25};
	private static double[] capbpBins={0.2,2,15};
	private static double[] chealbBins={0.1,1.0,5.0};
	private static double[] galapaBins={0.1,1.0,5.0};
	private static double[] matsppBins={0.1,1.0,5.0};
	private static double[] paprhoBins={0.1,1.0,5.0};
	private static double[] poaannBins={0.1,1.0,5.0};
	private static double[] polaviBins={0.1,1.0,5.0};
	private static double[] stemedBins={0.1,1.0,5.0};
	private static double[] vioarvBins={0.2,2.0,10.0};
	
	private static Map<String,double[]> binMap = new HashMap<String,double[]>();
	static {
		binMap.put("ALOMYO", alomyoBins);
		binMap.put("BROSTE", brosteBins);
		binMap.put("BRANAP", branapBins);
		binMap.put("CAPBP", capbpBins);
		binMap.put("CHEALB", chealbBins);
		binMap.put("GALAPA", galapaBins);
		binMap.put("MATSPP", matsppBins);
		binMap.put("PAPRHO", paprhoBins);
		binMap.put("POAANN", poaannBins);
		binMap.put("POLAVI", polaviBins);
		binMap.put("STEMED", stemedBins);
		binMap.put("VIOARV", vioarvBins);
	}
	public double stubbleSeedsPerPlant(){
		return 500; /// Place-Holder ... this needs to be accurately calculated
	}
	
	public double[] bins(){ 
		if ( binMap.containsKey(this.toString())){
			return binMap.get(this.toString());
		} else {
			System.out.println("Error: attempt to get bins but they are undefined for "+this.toString());
			return (new double[1]);
		}
	};
	
//	private WeedSpecies
	
}
